package com.yiyuan.app.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.guaike.core.mybatis.plugins.BaseDAO;
import com.yiyuan.app.entity.po.SysConfPO;
import com.yiyuan.app.mapper.SysConfMapper;
import org.springframework.stereotype.Repository;

@Repository
public class SysConfDAO extends BaseDAO<SysConfMapper, SysConfPO> {

    public SysConfPO findOne(String codeParent, String codeSecond) {
        LambdaQueryWrapper<SysConfPO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(SysConfPO::getCodeParent, codeParent);
        queryWrapper.eq(SysConfPO::getCodeSecond, codeSecond);
        return getBaseMapper().selectOne(queryWrapper);
    }
}
